package com.mmy.service.plane.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mmy.dao.plane.TPlaneAirportRepository;
import com.mmy.dao.plane.VPlaneAirportRepository;
import com.mmy.domain.plane.TPlaneAirport;
import com.mmy.domain.plane.VPlaneAirport;
import com.mmy.service.plane.TPlaneAirportService;

@Service
public class TPlaneAirportServiceImpl implements TPlaneAirportService {

	@Autowired
	TPlaneAirportRepository tPlaneAirportRepository;
	@Autowired
	VPlaneAirportRepository vPlaneAirportRepository;

	/**
	 * 查找全部
	 * 
	 * @param
	 * @return
	 */
	public List<VPlaneAirport> findAll() {
		// TODO Auto-generated method stub
		return vPlaneAirportRepository.findAll();
	}

	/**
	 * 获取最大值
	 * 
	 * @param
	 * @return
	 */
	public Object getMaxAirportID() {
		// TODO Auto-generated method stub
		return tPlaneAirportRepository.getMaxAirportID();
	}

	/**
	 * 新增id
	 * 
	 * @param
	 * @return
	 */
	public void save(int airportID) {
		// TODO Auto-generated method stub
		tPlaneAirportRepository.save(airportID);
	}

	/**
	 * 新增
	 * 
	 * @param
	 * @return
	 */
	public void save(TPlaneAirport tPlaneAirport) {
		// TODO Auto-generated method stub
		tPlaneAirportRepository.save(tPlaneAirport);
	}

	/**
	 * 删除
	 * 
	 * @param
	 * @return
	 */
	public void delPlaneAirport(List<Integer> lstAirportID) {
		// TODO Auto-generated method stub
		tPlaneAirportRepository.delPlaneAirport(lstAirportID);
	}

	/**
	 * 通过id查找
	 * 
	 * @param
	 * @return
	 */
	public TPlaneAirport findByAirportID(int iAirportID) {
		// TODO Auto-generated method stub
		return tPlaneAirportRepository.findByAirportID(iAirportID);
	}

	/**
	 * 通过name查找
	 * 
	 * @param
	 * @return
	 */
	public List<VPlaneAirport> findByAirportName(String strAirportName) {
		// TODO Auto-generated method stub
		return vPlaneAirportRepository.findByAirportName(strAirportName);
	}

	public List<VPlaneAirport> findAirport(int zongID) {
		// TODO Auto-generated method stub
		// return vPlaneAirportRepository.findAirport(zongID);
		return null;
	}

}
